package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestBankClassInfo;
import com.estar.assistsurvy.entity.ResponseBankClassInfo;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class BankTopClassInfoThread extends BaseThread {

	private RequestBankClassInfo requestBank;

	public BankTopClassInfoThread(Context context, Handler handler, RequestBankClassInfo requestBank) {
		super(context, handler);
		this.requestBank = requestBank;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.BANKTOPCLASSINFO;
		json=gson.toJson(requestBank);
		postRequest(url_str, json);
		Log.i("wl", "银行大类请求返回值"+result);
		if(result!=null){
			ResponseBankClassInfo bankInfo=new ResponseBankClassInfo();
			bankInfo=gson.fromJson(result, ResponseBankClassInfo.class);
			msg.what=1;
			msg.obj=bankInfo;
			msg.sendToTarget();
		}
	}
}
